
<!DOCTYPE HTML>
<html lang="en" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>schema查询语法 · InfluxDB中文文档</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="jasper">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-comment/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="database_management.html" />
    
    
    <link rel="prev" href="data_exploration.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="https://legacy.gitbook.com/book/jasper-zhang1/influxdb" target="_blank" class="custom-link">InfluxDB中文文档</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../Introduction/">
            
                <a href="../Introduction/">
            
                    
                    介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../Introduction/installation.html">
            
                <a href="../Introduction/installation.html">
            
                    
                    安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../Introduction/getting_start.html">
            
                <a href="../Introduction/getting_start.html">
            
                    
                    入门指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../Guide/">
            
                <a href="../Guide/">
            
                    
                    使用指南
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../Guide/writing_data.html">
            
                <a href="../Guide/writing_data.html">
            
                    
                    写入数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../Guide/querying_data.html">
            
                <a href="../Guide/querying_data.html">
            
                    
                    查询数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../Guide/downsampling_and_retention.html">
            
                <a href="../Guide/downsampling_and_retention.html">
            
                    
                    采样和数据保留
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../Guide/hardware_sizing.html">
            
                <a href="../Guide/hardware_sizing.html">
            
                    
                    硬件指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="../Guide/https_setup.html">
            
                <a href="../Guide/https_setup.html">
            
                    
                    HTTPS设置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../Concepts/">
            
                <a href="../Concepts/">
            
                    
                    概念介绍
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../Concepts/key_concepts.html">
            
                <a href="../Concepts/key_concepts.html">
            
                    
                    关键概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../Concepts/glossary.html">
            
                <a href="../Concepts/glossary.html">
            
                    
                    专业术语
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../Concepts/crosswalk.html">
            
                <a href="../Concepts/crosswalk.html">
            
                    
                    与SQL比较
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../Concepts/insights_tradeoffs.html">
            
                <a href="../Concepts/insights_tradeoffs.html">
            
                    
                    InfluxDB的设计见解和权衡
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="../Concepts/schema_and_data_layout.html">
            
                <a href="../Concepts/schema_and_data_layout.html">
            
                    
                    schema设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="../Concepts/storage_engine.html">
            
                <a href="../Concepts/storage_engine.html">
            
                    
                    存储引擎
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Write_protocols/">
            
                <a href="../Write_protocols/">
            
                    
                    写入协议
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../Write_protocols/line_protocol.html">
            
                <a href="../Write_protocols/line_protocol.html">
            
                    
                    行协议
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="./">
            
                <a href="./">
            
                    
                    查询语言
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="data_exploration.html">
            
                <a href="data_exploration.html">
            
                    
                    数据查询语法
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.6.2" data-path="schema_exploration.html">
            
                <a href="schema_exploration.html">
            
                    
                    schema查询语法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="database_management.html">
            
                <a href="database_management.html">
            
                    
                    数据库管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="continuous_queries.html">
            
                <a href="continuous_queries.html">
            
                    
                    连续查询
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="functions.html">
            
                <a href="functions.html">
            
                    
                    函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="math_operators.html">
            
                <a href="math_operators.html">
            
                    
                    数学运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="authentication_and_authorization.html">
            
                <a href="authentication_and_authorization.html">
            
                    
                    认证和授权
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../Troubleshooting/">
            
                <a href="../Troubleshooting/">
            
                    
                    故障排除
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../Troubleshooting/faq.html">
            
                <a href="../Troubleshooting/faq.html">
            
                    
                    FAQ
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../Troubleshooting/system_monitor.html">
            
                <a href="../Troubleshooting/system_monitor.html">
            
                    
                    系统监控
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../Troubleshooting/query_management.html">
            
                <a href="../Troubleshooting/query_management.html">
            
                    
                    查询管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../Troubleshooting/error_messages.html">
            
                <a href="../Troubleshooting/error_messages.html">
            
                    
                    错误信息
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >schema查询语法</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="schema&#x67E5;&#x8BE2;&#x8BED;&#x6CD5;">schema&#x67E5;&#x8BE2;&#x8BED;&#x6CD5;</h1>
<p>InfluxQL&#x662F;&#x4E00;&#x79CD;&#x7C7B;&#x4F3C;SQL&#x7684;&#x67E5;&#x8BE2;&#x8BED;&#x8A00;&#xFF0C;&#x7528;&#x4E8E;&#x4E0E;InfluxDB&#x4E2D;&#x7684;&#x6570;&#x636E;&#x8FDB;&#x884C;&#x4EA4;&#x4E92;&#x3002;&#x4E0B;&#x9762;&#x6211;&#x4EEC;&#x8981;&#x4ECB;&#x7ECD;&#x4E00;&#x4E9B;&#x6709;&#x7528;&#x7684;&#x67E5;&#x8BE2;schema&#x7684;&#x8BED;&#x6CD5;&#xFF1A;</p>
<ul>
<li>SHOW DATABASES</li>
<li>SHOW RETENTION POLICIES</li>
<li>SHOW SERIES</li>
<li>SHOW MEASUREMENTS</li>
<li>SHOW TAG KEYS</li>
<li>SHOW TAG VALUES</li>
<li>SHOW FIELD KEYS</li>
</ul>
<p>&#x5728;&#x5F00;&#x59CB;&#x4E4B;&#x524D;&#xFF0C;&#x9ED8;&#x8BA4;&#x5DF2;&#x7ECF;&#x767B;&#x5165;&#x4E86;CLI&#xFF1A;</p>
<pre><code>$ influx -precision rfc3339 
Connected to http://localhost:8086 version 1.3.x
InfluxDB shell 1.3.x
&gt;
</code></pre><h2 id="show-databases">SHOW DATABASES</h2>
<p>&#x8FD4;&#x56DE;&#x5F53;&#x524D;&#x5B9E;&#x4F8B;&#x4E0A;&#x7684;&#x6240;&#x6709;&#x7684;&#x6570;&#x636E;&#x5E93;&#x3002;</p>
<h3 id="&#x8BED;&#x6CD5;">&#x8BED;&#x6CD5;</h3>
<pre><code>SHOW DATABASES
</code></pre><h3 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h3>
<h4 id="&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;show-databases&#x67E5;&#x8BE2;">&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;<code>SHOW DATABASES</code>&#x67E5;&#x8BE2;</h4>
<pre><code>&gt; SHOW DATABASES

name: databases
name
----
NOAA_water_database
_internal
</code></pre><h2 id="show-retention-policies">SHOW RETENTION POLICIES</h2>
<p>&#x8FD4;&#x56DE;&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#x7684;&#x4FDD;&#x7559;&#x7B56;&#x7565;&#x7684;&#x5217;&#x8868;&#x3002;</p>
<h3 id="&#x8BED;&#x6CD5;">&#x8BED;&#x6CD5;</h3>
<pre><code>SHOW RETENTION POLICIES [ON &lt;database_name&gt;]
</code></pre><h3 id="&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;">&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;</h3>
<p><code>ON &lt;database_name&gt;</code>&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002;&#x5982;&#x679C;&#x67E5;&#x8BE2;&#x4E0D;&#x5305;&#x62EC;<code>ON &lt;database_name&gt;</code>&#xFF0C;&#x5219;&#x5FC5;&#x987B;&#x5728;CLI&#x4E2D;&#x4F7F;&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x6216;&#x8005;&#x5728;HTTP API&#x8BF7;&#x6C42;&#x4E2D;&#x6307;&#x5B9A;<code>db</code>&#x67E5;&#x8BE2;&#x5B57;&#x7B26;&#x4E32;&#x53C2;&#x6570;&#x3002;</p>
<h3 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h3>
<h4 id="&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;on&#x5B50;&#x53E5;&#x7684;show-retention-policies">&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW RETENTION POLICIES</code></h4>
<pre><code>&gt; SHOW RETENTION POLICIES ON NOAA_water_database

name      duration   shardGroupDuration   replicaN   default
----      --------   ------------------   --------   -------
autogen   0s         168h0m0s             1          true
</code></pre><p>&#x8BE5;&#x67E5;&#x8BE2;&#x4EE5;&#x8868;&#x683C;&#x683C;&#x5F0F;&#x8FD4;&#x56DE;&#x6570;&#x636E;&#x5E93;<code>NOAA_water_database</code>&#x4E2D;&#x7684;&#x4FDD;&#x7559;&#x7B56;&#x7565;&#x5217;&#x8868;&#x3002; &#x8BE5;&#x6570;&#x636E;&#x5E93;&#x6709;&#x4E00;&#x4E2A;&#x540D;&#x4E3A;<code>autogen</code>&#x7684;&#x4FDD;&#x7559;&#x7B56;&#x7565;&#x3002;&#x8BE5;&#x4FDD;&#x7559;&#x7B56;&#x7565;&#x5177;&#x6709;&#x65E0;&#x9650;&#x6301;&#x7EED;&#x65F6;&#x95F4;&#xFF0C;&#x6301;&#x7EED;&#x65F6;&#x95F4;&#x4E03;&#x5929;&#x7684;shard group&#xFF0C;&#x526F;&#x672C;&#x6570;&#x4E3A;1&#xFF0C;&#x5E76;&#x4E14;&#x662F;&#x6570;&#x636E;&#x5E93;&#x7684;<code>DEFAULT</code>&#x4FDD;&#x7559;&#x7B56;&#x7565;&#x3002;</p>
<h4 id="&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E0D;&#x5E26;on&#x5B50;&#x53E5;&#x7684;show-retention-policies">&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E0D;&#x5E26;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW RETENTION POLICIES</code></h4>
<h5 id="cli">CLI</h5>
<p>&#x4F7F;&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF1A;</p>
<pre><code>&gt; USE NOAA_water_database
Using database NOAA_water_database

&gt; SHOW RETENTION POLICIES

name      duration   shardGroupDuration   replicaN   default
----      --------   ------------------   --------   -------
autogen   0s         168h0m0s             1          true
</code></pre><h5 id="http-api">HTTP API</h5>
<p>&#x7528;<code>db</code>&#x53C2;&#x6570;&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF1A;</p>
<pre><code>~# curl -G &quot;http://localhost:8086/query?db=NOAA_water_database&amp;pretty=true&quot; --data-urlencode &quot;q=SHOW RETENTION POLICIES&quot;

{
    &quot;results&quot;: [
        {
            &quot;statement_id&quot;: 0,
            &quot;series&quot;: [
                {
                    &quot;columns&quot;: [
                        &quot;name&quot;,
                        &quot;duration&quot;,
                        &quot;shardGroupDuration&quot;,
                        &quot;replicaN&quot;,
                        &quot;default&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;autogen&quot;,
                            &quot;0s&quot;,
                            &quot;168h0m0s&quot;,
                            1,
                            true
                        ]
                    ]
                }
            ]
        }
    ]
}
</code></pre><h2 id="show-series">SHOW SERIES</h2>
<p>&#x8FD4;&#x56DE;&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#x7684;series&#x5217;&#x8868;&#x3002;</p>
<h3 id="&#x8BED;&#x6CD5;">&#x8BED;&#x6CD5;</h3>
<pre><code>SHOW SERIES [ON &lt;database_name&gt;] [FROM_clause] [WHERE &lt;tag_key&gt; &lt;operator&gt; [ &apos;&lt;tag_value&gt;&apos; | &lt;regular_expression&gt;]] [LIMIT_clause] [OFFSET_clause]
</code></pre><h3 id="&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;">&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;</h3>
<p><code>ON &lt;database_name&gt;</code>&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002;&#x5982;&#x679C;&#x67E5;&#x8BE2;&#x4E0D;&#x5305;&#x62EC;<code>ON &lt;database_name&gt;</code>&#xFF0C;&#x5219;&#x5FC5;&#x987B;&#x5728;CLI&#x4E2D;&#x4F7F;&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x6216;&#x8005;&#x5728;HTTP API&#x8BF7;&#x6C42;&#x4E2D;&#x6307;&#x5B9A;<code>db</code>&#x67E5;&#x8BE2;&#x5B57;&#x7B26;&#x4E32;&#x53C2;&#x6570;&#x3002;</p>
<p><code>FROM</code>&#xFF0C;<code>WHERE</code>&#xFF0C;<code>LIMIT</code>&#x548C;<code>OFFSET</code>&#x5B50;&#x53E5;&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002; <code>WHERE</code>&#x5B50;&#x53E5;&#x652F;&#x6301;tag&#x6BD4;&#x8F83;; field&#x6BD4;&#x8F83;&#x5BF9;<code>SHOW SERIES</code>&#x67E5;&#x8BE2;&#x65E0;&#x6548;&#x3002;</p>
<p><code>WHERE</code>&#x5B50;&#x53E5;&#x4E2D;&#x652F;&#x6301;&#x7684;&#x8FD0;&#x7B97;&#x7B26;&#xFF1A;</p>
<p><code>=</code> &#x7B49;&#x4E8E;<br><code>&lt;&gt;</code> &#x4E0D;&#x7B49;&#x4E8E;<br><code>!=</code> &#x4E0D;&#x7B49;&#x4E8E;<br><code>=~</code> &#x5339;&#x914D;<br><code>!~</code> &#x4E0D;&#x5339;&#x914D;</p>
<h3 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h3>
<h4 id="&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;on&#x5B50;&#x53E5;&#x7684;show-series">&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW SERIES</code></h4>
<pre><code>&gt; SHOW SERIES ON NOAA_water_database

key
---
average_temperature,location=coyote_creek
average_temperature,location=santa_monica
h2o_feet,location=coyote_creek
h2o_feet,location=santa_monica
h2o_pH,location=coyote_creek
h2o_pH,location=santa_monica
h2o_quality,location=coyote_creek,randtag=1
h2o_quality,location=coyote_creek,randtag=2
h2o_quality,location=coyote_creek,randtag=3
h2o_quality,location=santa_monica,randtag=1
h2o_quality,location=santa_monica,randtag=2
h2o_quality,location=santa_monica,randtag=3
h2o_temperature,location=coyote_creek
h2o_temperature,location=santa_monica
</code></pre><p>&#x67E5;&#x8BE2;&#x7684;&#x8F93;&#x51FA;&#x7C7B;&#x4F3C;&#x4E8E;&#x884C;&#x534F;&#x8BAE;&#x683C;&#x5F0F;&#x3002;&#x7B2C;&#x4E00;&#x4E2A;&#x9017;&#x53F7;&#x4E4B;&#x524D;&#x7684;&#x6240;&#x6709;&#x5185;&#x5BB9;&#x90FD;&#x662F;measurement&#x540D;&#x79F0;&#x3002;&#x7B2C;&#x4E00;&#x4E2A;&#x9017;&#x53F7;&#x540E;&#x7684;&#x6240;&#x6709;&#x5185;&#x5BB9;&#x90FD;&#x662F;tag key&#x6216;tag value&#x3002; <code>NOAA_water_database</code>&#x6709;&#x4E94;&#x4E2A;&#x4E0D;&#x540C;&#x7684;measurement&#x548C;14&#x4E2A;&#x4E0D;&#x540C;&#x7684;series&#x3002;</p>
<h4 id="&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E0D;&#x5E26;on&#x5B50;&#x53E5;&#x7684;show-series">&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E0D;&#x5E26;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW SERIES</code></h4>
<h5 id="cli">CLI</h5>
<p>&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF1A;</p>
<pre><code>&gt; USE NOAA_water_database
Using database NOAA_water_database

&gt; SHOW SERIES

key
---
average_temperature,location=coyote_creek
average_temperature,location=santa_monica
h2o_feet,location=coyote_creek
h2o_feet,location=santa_monica
h2o_pH,location=coyote_creek
h2o_pH,location=santa_monica
h2o_quality,location=coyote_creek,randtag=1
h2o_quality,location=coyote_creek,randtag=2
h2o_quality,location=coyote_creek,randtag=3
h2o_quality,location=santa_monica,randtag=1
h2o_quality,location=santa_monica,randtag=2
h2o_quality,location=santa_monica,randtag=3
h2o_temperature,location=coyote_creek
h2o_temperature,location=santa_monica
</code></pre><h5 id="http-api">HTTP API</h5>
<p>&#x7528;<code>db</code>&#x53C2;&#x6570;&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF1A;</p>
<pre><code>~# curl -G &quot;http://localhost:8086/query?db=NOAA_water_database&amp;pretty=true&quot; --data-urlencode &quot;q=SHOW SERIES&quot;

{
    &quot;results&quot;: [
        {
            &quot;statement_id&quot;: 0,
            &quot;series&quot;: [
                {
                    &quot;columns&quot;: [
                        &quot;key&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;average_temperature,location=coyote_creek&quot;
                        ],
                        [
                            &quot;average_temperature,location=santa_monica&quot;
                        ],
                        [
                            &quot;h2o_feet,location=coyote_creek&quot;
                        ],
                        [
                            &quot;h2o_feet,location=santa_monica&quot;
                        ],
                        [
                            &quot;h2o_pH,location=coyote_creek&quot;
                        ],
                        [
                            &quot;h2o_pH,location=santa_monica&quot;
                        ],
                        [
                            &quot;h2o_quality,location=coyote_creek,randtag=1&quot;
                        ],
                        [
                            &quot;h2o_quality,location=coyote_creek,randtag=2&quot;
                        ],
                        [
                            &quot;h2o_quality,location=coyote_creek,randtag=3&quot;
                        ],
                        [
                            &quot;h2o_quality,location=santa_monica,randtag=1&quot;
                        ],
                        [
                            &quot;h2o_quality,location=santa_monica,randtag=2&quot;
                        ],
                        [
                            &quot;h2o_quality,location=santa_monica,randtag=3&quot;
                        ],
                        [
                            &quot;h2o_temperature,location=coyote_creek&quot;
                        ],
                        [
                            &quot;h2o_temperature,location=santa_monica&quot;
                        ]
                    ]
                }
            ]
        }
    ]
}
</code></pre><h4 id="&#x4F8B;&#x4E09;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;&#x591A;&#x4E2A;&#x5B50;&#x53E5;&#x7684;show-series">&#x4F8B;&#x4E09;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;&#x591A;&#x4E2A;&#x5B50;&#x53E5;&#x7684;<code>SHOW SERIES</code></h4>
<pre><code>&gt; SHOW SERIES ON NOAA_water_database FROM &quot;h2o_quality&quot; WHERE &quot;location&quot; = &apos;coyote_creek&apos; LIMIT 2

key
---
h2o_quality,location=coyote_creek,randtag=1
h2o_quality,location=coyote_creek,randtag=2
</code></pre><p>&#x67E5;&#x8BE2;&#x8FD4;&#x56DE;&#x6570;&#x636E;&#x5E93;<code>NOAA_water_database</code>&#x4E2D;&#x4E0E;measurement <code>h2o_quality</code>&#x76F8;&#x5173;&#x8054;&#x7684;&#x5E76;&#x4E14;tag&#x4E3A;<code>location = coyote_creek</code>&#x7684;&#x4E24;&#x4E2A;series&#x3002;</p>
<h2 id="show-measurements">SHOW MEASUREMENTS</h2>
<p>&#x8FD4;&#x56DE;&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#x7684;measurement&#x5217;&#x8868;&#x3002;</p>
<h3 id="&#x8BED;&#x6CD5;">&#x8BED;&#x6CD5;</h3>
<pre><code>SHOW MEASUREMENTS [ON &lt;database_name&gt;] [WITH MEASUREMENT &lt;regular_expression&gt;] [WHERE &lt;tag_key&gt; &lt;operator&gt; [&apos;&lt;tag_value&gt;&apos; | &lt;regular_expression&gt;]] [LIMIT_clause] [OFFSET_clause]
</code></pre><h3 id="&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;">&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;</h3>
<p><code>ON &lt;database_name&gt;</code>&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002;&#x5982;&#x679C;&#x67E5;&#x8BE2;&#x4E0D;&#x5305;&#x62EC;<code>ON &lt;database_name&gt;</code>&#xFF0C;&#x5219;&#x5FC5;&#x987B;&#x5728;CLI&#x4E2D;&#x4F7F;&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x6216;&#x8005;&#x5728;HTTP API&#x8BF7;&#x6C42;&#x4E2D;&#x6307;&#x5B9A;<code>db</code>&#x67E5;&#x8BE2;&#x5B57;&#x7B26;&#x4E32;&#x53C2;&#x6570;&#x3002;</p>
<p><code>WITH</code>&#xFF0C;<code>WHERE</code>&#xFF0C;<code>LIMIT</code>&#x548C;<code>OFFSET</code>&#x5B50;&#x53E5;&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002; <code>WHERE</code>&#x5B50;&#x53E5;&#x652F;&#x6301;tag&#x6BD4;&#x8F83;; field&#x6BD4;&#x8F83;&#x5BF9;<code>SHOW MEASUREMENTS</code>&#x67E5;&#x8BE2;&#x65E0;&#x6548;&#x3002;</p>
<p><code>WHERE</code>&#x5B50;&#x53E5;&#x4E2D;&#x652F;&#x6301;&#x7684;&#x8FD0;&#x7B97;&#x7B26;&#xFF1A;</p>
<p><code>=</code> &#x7B49;&#x4E8E;<br><code>&lt;&gt;</code> &#x4E0D;&#x7B49;&#x4E8E;<br><code>!=</code> &#x4E0D;&#x7B49;&#x4E8E;<br><code>=~</code> &#x5339;&#x914D;<br><code>!~</code> &#x4E0D;&#x5339;&#x914D;</p>
<h3 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h3>
<h4 id="&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;on&#x5B50;&#x53E5;&#x7684;show-measurements">&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW MEASUREMENTS</code></h4>
<pre><code>&gt; SHOW MEASUREMENTS ON NOAA_water_database

name: measurements
name
----
average_temperature
h2o_feet
h2o_pH
h2o_quality
h2o_temperature
</code></pre><p>&#x67E5;&#x8BE2;&#x8FD4;&#x56DE;&#x6570;&#x636E;&#x5E93;<code>NOAA_water_database</code>&#x4E2D;&#x7684;measurement&#x5217;&#x8868;&#x3002;&#x6570;&#x636E;&#x5E93;&#x6709;&#x4E94;&#x4E2A;measurement&#xFF1A;<code>average_temperature</code>&#xFF0C;<code>h2o_feet</code>&#xFF0C;<code>h2o_pH</code>&#xFF0C;<code>h2o_quality</code>&#x548C;<code>h2o_temperature</code>&#x3002;</p>
<h4 id="&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E0D;&#x5E26;on&#x5B50;&#x53E5;&#x7684;show-measurements">&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E0D;&#x5E26;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW MEASUREMENTS</code></h4>
<h5 id="cli">CLI</h5>
<p>&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#x3002;</p>
<pre><code>&gt; USE NOAA_water_database
Using database NOAA_water_database

&gt; SHOW MEASUREMENTS
name: measurements
name
----
average_temperature
h2o_feet
h2o_pH
h2o_quality
h2o_temperature
</code></pre><h4 id="http-api">HTTP API</h4>
<p>&#x4F7F;&#x7528;&#x53C2;&#x6570;<code>db</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF1A;</p>
<pre><code>~# curl -G &quot;http://localhost:8086/query?db=NOAA_water_database&amp;pretty=true&quot; --data-urlencode &quot;q=SHOW MEASUREMENTS&quot;

{
  {
      &quot;results&quot;: [
          {
              &quot;statement_id&quot;: 0,
              &quot;series&quot;: [
                  {
                      &quot;name&quot;: &quot;measurements&quot;,
                      &quot;columns&quot;: [
                          &quot;name&quot;
                      ],
                      &quot;values&quot;: [
                          [
                              &quot;average_temperature&quot;
                          ],
                          [
                              &quot;h2o_feet&quot;
                          ],
                          [
                              &quot;h2o_pH&quot;
                          ],
                          [
                              &quot;h2o_quality&quot;
                          ],
                          [
                              &quot;h2o_temperature&quot;
                          ]
                      ]
                  }
              ]
          }
      ]
  }
</code></pre><h4 id="&#x4F8B;&#x4E09;&#xFF1A;&#x8FD0;&#x884C;&#x6709;&#x591A;&#x4E2A;&#x5B50;&#x53E5;&#x7684;show-measurements1">&#x4F8B;&#x4E09;&#xFF1A;&#x8FD0;&#x884C;&#x6709;&#x591A;&#x4E2A;&#x5B50;&#x53E5;&#x7684;<code>SHOW MEASUREMENTS</code>(1)</h4>
<pre><code>&gt; SHOW MEASUREMENTS ON NOAA_water_database WITH MEASUREMENT =~ /h2o.*/ LIMIT 2 OFFSET 1

name: measurements
name
----
h2o_pH
h2o_quality
</code></pre><p>&#x8BE5;&#x67E5;&#x8BE2;&#x8FD4;&#x56DE;&#x4EE5;&#x4EE5;<code>h2o</code>&#x5F00;&#x5934;&#x7684;<code>NOAA_water_database</code>&#x6570;&#x636E;&#x5E93;&#x4E2D;&#x7684;measurement&#x3002; <code>LIMIT</code>&#x548C;<code>OFFSET</code>&#x5B50;&#x53E5;&#x5C06;&#x8FD4;&#x56DE;&#x7684;measurement&#x540D;&#x79F0;,&#x5E76;&#x4E14;&#x6570;&#x91CF;&#x9650;&#x5236;&#x4E3A;&#x4E24;&#x4E2A;&#xFF0C;&#x518D;&#x5C06;&#x7ED3;&#x679C;&#x504F;&#x79FB;&#x4E00;&#x4E2A;&#xFF0C;&#x6240;&#x4EE5;&#x8DF3;&#x8FC7;&#x4E86;measurement<code>h2o_feet</code>&#x3002;</p>
<h4 id="&#x4F8B;&#x56DB;&#xFF1A;&#x8FD0;&#x884C;&#x6709;&#x591A;&#x4E2A;&#x5B50;&#x53E5;&#x7684;show-measurements2">&#x4F8B;&#x56DB;&#xFF1A;&#x8FD0;&#x884C;&#x6709;&#x591A;&#x4E2A;&#x5B50;&#x53E5;&#x7684;<code>SHOW MEASUREMENTS</code>(2)</h4>
<pre><code>&gt; SHOW MEASUREMENTS ON NOAA_water_database WITH MEASUREMENT =~ /h2o.*/ WHERE &quot;randtag&quot;  =~ /\d/

name: measurements
name
----
h2o_quality
</code></pre><p>&#x8BE5;&#x67E5;&#x8BE2;&#x8FD4;&#x56DE;<code>NOAA_water_database</code>&#x4E2D;&#x4EE5;<code>h2o</code>&#x5F00;&#x5934;&#xFF0C;&#x5E76;&#x4E14;tag<code>randtag</code>&#x5305;&#x542B;&#x4E00;&#x4E2A;&#x6574;&#x6570;&#x7684;&#x6240;&#x6709;measurement&#x3002;</p>
<h2 id="show-tag-keys">SHOW TAG KEYS</h2>
<p>&#x8FD4;&#x56DE;&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#x7684;tag key&#x5217;&#x8868;&#x3002;</p>
<h3 id="&#x8BED;&#x6CD5;">&#x8BED;&#x6CD5;</h3>
<pre><code>SHOW TAG KEYS [ON &lt;database_name&gt;] [FROM_clause] [WHERE &lt;tag_key&gt; &lt;operator&gt; [&apos;&lt;tag_value&gt;&apos; | &lt;regular_expression&gt;]] [LIMIT_clause] [OFFSET_clause]
</code></pre><h3 id="&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;">&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;</h3>
<p><code>ON &lt;database_name&gt;</code>&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002;&#x5982;&#x679C;&#x67E5;&#x8BE2;&#x4E0D;&#x5305;&#x62EC;<code>ON &lt;database_name&gt;</code>&#xFF0C;&#x5219;&#x5FC5;&#x987B;&#x5728;CLI&#x4E2D;&#x4F7F;&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x6216;&#x8005;&#x5728;HTTP API&#x8BF7;&#x6C42;&#x4E2D;&#x6307;&#x5B9A;<code>db</code>&#x67E5;&#x8BE2;&#x5B57;&#x7B26;&#x4E32;&#x53C2;&#x6570;&#x3002;</p>
<p><code>FROM</code>&#x548C;<code>WHERE</code>&#x5B50;&#x53E5;&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002; <code>WHERE</code>&#x5B50;&#x53E5;&#x652F;&#x6301;tag&#x6BD4;&#x8F83;; field&#x6BD4;&#x8F83;&#x5BF9;<code>SHOW TAG KEYS</code>&#x67E5;&#x8BE2;&#x65E0;&#x6548;&#x3002;</p>
<p><code>WHERE</code>&#x5B50;&#x53E5;&#x4E2D;&#x652F;&#x6301;&#x7684;&#x8FD0;&#x7B97;&#x7B26;&#xFF1A;</p>
<p><code>=</code> &#x7B49;&#x4E8E;<br><code>&lt;&gt;</code> &#x4E0D;&#x7B49;&#x4E8E;<br><code>!=</code> &#x4E0D;&#x7B49;&#x4E8E;<br><code>=~</code> &#x5339;&#x914D;<br><code>!~</code> &#x4E0D;&#x5339;&#x914D;</p>
<h3 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h3>
<h4 id="&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;on&#x5B50;&#x53E5;&#x7684;show-tag-keys">&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW TAG KEYS</code></h4>
<pre><code>&gt; SHOW TAG KEYS ON &quot;NOAA_water_database&quot;

name: average_temperature
tagKey
------
location

name: h2o_feet
tagKey
------
location

name: h2o_pH
tagKey
------
location

name: h2o_quality
tagKey
------
location
randtag

name: h2o_temperature
tagKey
------
location
</code></pre><p>&#x67E5;&#x8BE2;&#x8FD4;&#x56DE;&#x6570;&#x636E;&#x5E93;<code>NOAA_water_database</code>&#x4E2D;&#x7684;tag key&#x5217;&#x8868;&#x3002;&#x8F93;&#x51FA;&#x6309;measurement&#x540D;&#x79F0;&#x7ED9;tag key&#x5206;&#x7EC4;; &#x5B83;&#x663E;&#x793A;&#x6BCF;&#x4E2A;measurement&#x90FD;&#x5177;&#x6709;tag key<code>location</code>&#xFF0C;&#x5E76;&#x4E14;measurement<code>h2o_quality</code>&#x5177;&#x6709;&#x989D;&#x5916;&#x7684;tag key <code>randtag</code>&#x3002;</p>
<h4 id="&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E0D;&#x5E26;on&#x5B50;&#x53E5;&#x7684;show-tag-keys">&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E0D;&#x5E26;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW TAG KEYS</code></h4>
<h5 id="cli">CLI</h5>
<p>&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF1A;</p>
<pre><code>&gt; USE NOAA_water_database
Using database NOAA_water_database

&gt; SHOW TAG KEYS

name: average_temperature
tagKey
------
location

name: h2o_feet
tagKey
------
location

name: h2o_pH
tagKey
------
location

name: h2o_quality
tagKey
------
location
randtag

name: h2o_temperature
tagKey
------
location
</code></pre><h5 id="http-api">HTTP API</h5>
<p>&#x7528;&#x53C2;&#x6570;<code>db</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF1A;</p>
<pre><code>~# curl -G &quot;http://localhost:8086/query?db=NOAA_water_database&amp;pretty=true&quot; --data-urlencode &quot;q=SHOW TAG KEYS&quot;

{
    &quot;results&quot;: [
        {
            &quot;statement_id&quot;: 0,
            &quot;series&quot;: [
                {
                    &quot;name&quot;: &quot;average_temperature&quot;,
                    &quot;columns&quot;: [
                        &quot;tagKey&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;location&quot;
                        ]
                    ]
                },
                {
                    &quot;name&quot;: &quot;h2o_feet&quot;,
                    &quot;columns&quot;: [
                        &quot;tagKey&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;location&quot;
                        ]
                    ]
                },
                {
                    &quot;name&quot;: &quot;h2o_pH&quot;,
                    &quot;columns&quot;: [
                        &quot;tagKey&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;location&quot;
                        ]
                    ]
                },
                {
                    &quot;name&quot;: &quot;h2o_quality&quot;,
                    &quot;columns&quot;: [
                        &quot;tagKey&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;location&quot;
                        ],
                        [
                            &quot;randtag&quot;
                        ]
                    ]
                },
                {
                    &quot;name&quot;: &quot;h2o_temperature&quot;,
                    &quot;columns&quot;: [
                        &quot;tagKey&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;location&quot;
                        ]
                    ]
                }
            ]
        }
    ]
}
</code></pre><h4 id="&#x4F8B;&#x4E09;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;&#x591A;&#x4E2A;&#x5B50;&#x53E5;&#x7684;show-tag-keys">&#x4F8B;&#x4E09;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;&#x591A;&#x4E2A;&#x5B50;&#x53E5;&#x7684;<code>SHOW TAG KEYS</code></h4>
<pre><code>&gt; SHOW TAG KEYS ON &quot;NOAA_water_database&quot; FROM &quot;h2o_quality&quot; LIMIT 1 OFFSET 1

name: h2o_quality
tagKey
------
randtag
</code></pre><p>&#x8BE5;&#x67E5;&#x8BE2;&#x4ECE;&#x6570;&#x636E;&#x5E93;<code>NOAA_water_database</code>&#x7684;measurement<code>h2o_quality</code>&#x4E2D;&#x8FD4;&#x56DE;tag key&#x3002; <code>LIMIT</code>&#x548C;<code>OFFSET</code>&#x5B50;&#x53E5;&#x9650;&#x5236;&#x8FD4;&#x56DE;&#x5230;&#x4E00;&#x4E2A;tag key&#xFF0C;&#x518D;&#x5C06;&#x7ED3;&#x679C;&#x504F;&#x79FB;&#x4E00;&#x4E2A;&#x3002;</p>
<h2 id="show-tag-values">SHOW TAG VALUES</h2>
<p>&#x8FD4;&#x56DE;&#x6570;&#x636E;&#x5E93;&#x4E2D;&#x6307;&#x5B9A;tag key&#x7684;tag value&#x5217;&#x8868;&#x3002;</p>
<h3 id="&#x8BED;&#x6CD5;">&#x8BED;&#x6CD5;</h3>
<pre><code>SHOW TAG VALUES [ON &lt;database_name&gt;][FROM_clause] WITH KEY [ [&lt;operator&gt; &quot;&lt;tag_key&gt;&quot; | &lt;regular_expression&gt;] | [IN (&quot;&lt;tag_key1&gt;&quot;,&quot;&lt;tag_key2&quot;)]] [WHERE &lt;tag_key&gt; &lt;operator&gt; [&apos;&lt;tag_value&gt;&apos; | &lt;regular_expression&gt;]] [LIMIT_clause] [OFFSET_clause]
</code></pre><h3 id="&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;">&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;</h3>
<p><code>ON &lt;database_name&gt;</code>&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002;&#x5982;&#x679C;&#x67E5;&#x8BE2;&#x4E0D;&#x5305;&#x62EC;<code>ON &lt;database_name&gt;</code>&#xFF0C;&#x5219;&#x5FC5;&#x987B;&#x5728;CLI&#x4E2D;&#x4F7F;&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x6216;&#x8005;&#x5728;HTTP API&#x8BF7;&#x6C42;&#x4E2D;&#x6307;&#x5B9A;<code>db</code>&#x67E5;&#x8BE2;&#x5B57;&#x7B26;&#x4E32;&#x53C2;&#x6570;&#x3002;</p>
<p><code>WITH</code>&#x5B50;&#x53E5;&#x662F;&#x5FC5;&#x987B;&#x7684;&#xFF0C;&#x5B83;&#x652F;&#x6301;&#x6307;&#x5B9A;&#x4E00;&#x4E2A;&#x5355;&#x72EC;&#x7684;tag key&#x3001;&#x4E00;&#x4E2A;&#x8868;&#x8FBE;&#x5F0F;&#x6216;&#x662F;&#x591A;&#x4E2A;tag key&#x3002;</p>
<p><code>FROM</code>&#x3001;<code>WHERE</code>&#x3001;<code>LIMIT</code>&#x548C;<code>OFFSET</code>&#x5B50;&#x53E5;&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002; <code>WHERE</code>&#x5B50;&#x53E5;&#x652F;&#x6301;tag&#x6BD4;&#x8F83;; field&#x6BD4;&#x8F83;&#x5BF9;<code>SHOW TAG KEYS</code>&#x67E5;&#x8BE2;&#x65E0;&#x6548;&#x3002;</p>
<p><code>WHERE</code>&#x5B50;&#x53E5;&#x4E2D;&#x652F;&#x6301;&#x7684;&#x8FD0;&#x7B97;&#x7B26;&#xFF1A;</p>
<p><code>=</code> &#x7B49;&#x4E8E;<br><code>&lt;&gt;</code> &#x4E0D;&#x7B49;&#x4E8E;<br><code>!=</code> &#x4E0D;&#x7B49;&#x4E8E;<br><code>=~</code> &#x5339;&#x914D;<br><code>!~</code> &#x4E0D;&#x5339;&#x914D;</p>
<h3 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h3>
<h4 id="&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;on&#x5B50;&#x53E5;&#x7684;show-tag-values">&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW TAG VALUES</code></h4>
<pre><code>&gt; SHOW TAG VALUES ON &quot;NOAA_water_database&quot; WITH KEY = &quot;randtag&quot;

name: h2o_quality
key       value
---       -----
randtag   1
randtag   2
randtag   3
</code></pre><p>&#x8BE5;&#x67E5;&#x8BE2;&#x8FD4;&#x56DE;&#x6570;&#x636E;&#x5E93;<code>NOAA_water_database</code>&#xFF0C;tag key&#x4E3A;<code>randtag</code>&#x7684;&#x6240;&#x6709;tag value&#x3002;<code>SHOW TAG VALUES</code>&#x5C06;&#x7ED3;&#x679C;&#x6309;measurement&#x540D;&#x5B57;&#x5206;&#x7EC4;&#x3002;</p>
<h4 id="&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E0D;&#x5E26;on&#x5B50;&#x53E5;&#x7684;show-tag-values">&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E0D;&#x5E26;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW TAG VALUES</code></h4>
<h4 id="cli">CLI</h4>
<p>&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF1A;</p>
<pre><code>&gt; USE NOAA_water_database
Using database NOAA_water_database

&gt; SHOW TAG VALUES WITH KEY = &quot;randtag&quot;

name: h2o_quality
key       value
---       -----
randtag   1
randtag   2
randtag   3
</code></pre><h5 id="http-api">HTTP API</h5>
<p>&#x7528;&#x53C2;&#x6570;<code>db</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF1A;</p>
<pre><code>~# curl -G &quot;http://localhost:8086/query?db=NOAA_water_database&amp;pretty=true&quot; --data-urlencode &apos;q=SHOW TAG VALUES WITH KEY = &quot;randtag&quot;&apos;

{
    &quot;results&quot;: [
        {
            &quot;statement_id&quot;: 0,
            &quot;series&quot;: [
                {
                    &quot;name&quot;: &quot;h2o_quality&quot;,
                    &quot;columns&quot;: [
                        &quot;key&quot;,
                        &quot;value&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;randtag&quot;,
                            &quot;1&quot;
                        ],
                        [
                            &quot;randtag&quot;,
                            &quot;2&quot;
                        ],
                        [
                            &quot;randtag&quot;,
                            &quot;3&quot;
                        ]
                    ]
                }
            ]
        }
    ]
}
</code></pre><h4 id="&#x4F8B;&#x4E09;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;&#x591A;&#x4E2A;&#x5B50;&#x53E5;&#x7684;show-tag-values">&#x4F8B;&#x4E09;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;&#x591A;&#x4E2A;&#x5B50;&#x53E5;&#x7684;<code>SHOW TAG VALUES</code></h4>
<pre><code>&gt; SHOW TAG VALUES ON &quot;NOAA_water_database&quot; WITH KEY IN (&quot;location&quot;,&quot;randtag&quot;) WHERE &quot;randtag&quot; =~ /./ LIMIT 3

name: h2o_quality
key        value
---        -----
location   coyote_creek
location   santa_monica
randtag       1
</code></pre><p>&#x8BE5;&#x67E5;&#x8BE2;&#x4ECE;&#x6570;&#x636E;&#x5E93;<code>NOAA_water_database</code>&#x7684;&#x6240;&#x6709;measurement&#x4E2D;&#x8FD4;&#x56DE;tag key&#x4E3A;<code>location</code>&#x6216;&#x8005;<code>randtag</code>&#xFF0C;&#x5E76;&#x4E14;<code>randtag</code>&#x7684;tag value&#x4E0D;&#x4E3A;&#x7A7A;&#x7684;tag value&#x3002; <code>LIMIT</code>&#x5B50;&#x53E5;&#x9650;&#x5236;&#x8FD4;&#x56DE;&#x4E09;&#x4E2A;tag value&#x3002;</p>
<h2 id="show-field-keys">SHOW FIELD KEYS</h2>
<p>&#x8FD4;&#x56DE;field key&#x4EE5;&#x53CA;&#x5176;field value&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x3002;</p>
<h3 id="&#x8BED;&#x6CD5;">&#x8BED;&#x6CD5;</h3>
<pre><code>SHOW FIELD KEYS [ON &lt;database_name&gt;] [FROM &lt;measurement_name&gt;]
</code></pre><h3 id="&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;">&#x8BED;&#x6CD5;&#x63CF;&#x8FF0;</h3>
<p><code>ON &lt;database_name&gt;</code>&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002;&#x5982;&#x679C;&#x67E5;&#x8BE2;&#x4E0D;&#x5305;&#x62EC;<code>ON &lt;database_name&gt;</code>&#xFF0C;&#x5219;&#x5FC5;&#x987B;&#x5728;CLI&#x4E2D;&#x4F7F;&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF0C;&#x6216;&#x8005;&#x5728;HTTP API&#x8BF7;&#x6C42;&#x4E2D;&#x6307;&#x5B9A;<code>db</code>&#x67E5;&#x8BE2;&#x5B57;&#x7B26;&#x4E32;&#x53C2;&#x6570;&#x3002;</p>
<p><code>FROM</code>&#x5B50;&#x53E5;&#x4E5F;&#x662F;&#x53EF;&#x9009;&#x7684;&#x3002;</p>
<h3 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h3>
<h4 id="&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x4E00;&#x4E2A;&#x5E26;on&#x5B50;&#x53E5;&#x7684;show-field-keys">&#x4F8B;&#x4E00;&#xFF1A;&#x8FD0;&#x884C;&#x4E00;&#x4E2A;&#x5E26;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW FIELD KEYS</code></h4>
<pre><code>&gt; SHOW FIELD KEYS ON &quot;NOAA_water_database&quot;

name: average_temperature
fieldKey            fieldType
--------            ---------
degrees             float

name: h2o_feet
fieldKey            fieldType
--------            ---------
level description   string
water_level         float

name: h2o_pH
fieldKey            fieldType
--------            ---------
pH                  float

name: h2o_quality
fieldKey            fieldType
--------            ---------
index               float

name: h2o_temperature
fieldKey            fieldType
--------            ---------
degrees             float
</code></pre><p>&#x8BE5;&#x67E5;&#x8BE2;&#x8FD4;&#x56DE;&#x6570;&#x636E;&#x5E93;<code>NOAA_water_database</code>&#x4E2D;&#x7684;&#x6BCF;&#x4E2A;measurement&#x5BF9;&#x5E94;&#x7684;field key&#x4EE5;&#x53CA;&#x5176;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x3002;</p>
<h4 id="&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E00;&#x4E2A;&#x4E0D;&#x5E26;on&#x5B50;&#x53E5;&#x7684;show-field-keys">&#x4F8B;&#x4E8C;&#xFF1A;&#x8FD0;&#x884C;&#x4E00;&#x4E2A;&#x4E0D;&#x5E26;<code>ON</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW FIELD KEYS</code></h4>
<h5 id="cli">CLI</h5>
<p>&#x7528;<code>USE &lt;database_name&gt;</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF1A;</p>
<pre><code>&gt; USE NOAA_water_database
Using database NOAA_water_database

&gt; SHOW FIELD KEYS

name: average_temperature
fieldKey            fieldType
--------            ---------
degrees             float

name: h2o_feet
fieldKey            fieldType
--------            ---------
level description   string
water_level         float

name: h2o_pH
fieldKey            fieldType
--------            ---------
pH                  float

name: h2o_quality
fieldKey            fieldType
--------            ---------
index               float

name: h2o_temperature
fieldKey            fieldType
--------            ---------
degrees             float
</code></pre><h5 id="http-api">HTTP API</h5>
<p>&#x7528;&#x53C2;&#x6570;<code>db</code>&#x6307;&#x5B9A;&#x6570;&#x636E;&#x5E93;&#xFF1A;</p>
<pre><code>~# curl -G &quot;http://localhost:8086/query?db=NOAA_water_database&amp;pretty=true&quot; --data-urlencode &apos;q=SHOW FIELD KEYS&apos;

{
    &quot;results&quot;: [
        {
            &quot;statement_id&quot;: 0,
            &quot;series&quot;: [
                {
                    &quot;name&quot;: &quot;average_temperature&quot;,
                    &quot;columns&quot;: [
                        &quot;fieldKey&quot;,
                        &quot;fieldType&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;degrees&quot;,
                            &quot;float&quot;
                        ]
                    ]
                },
                {
                    &quot;name&quot;: &quot;h2o_feet&quot;,
                    &quot;columns&quot;: [
                        &quot;fieldKey&quot;,
                        &quot;fieldType&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;level description&quot;,
                            &quot;string&quot;
                        ],
                        [
                            &quot;water_level&quot;,
                            &quot;float&quot;
                        ]
                    ]
                },
                {
                    &quot;name&quot;: &quot;h2o_pH&quot;,
                    &quot;columns&quot;: [
                        &quot;fieldKey&quot;,
                        &quot;fieldType&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;pH&quot;,
                            &quot;float&quot;
                        ]
                    ]
                },
                {
                    &quot;name&quot;: &quot;h2o_quality&quot;,
                    &quot;columns&quot;: [
                        &quot;fieldKey&quot;,
                        &quot;fieldType&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;index&quot;,
                            &quot;float&quot;
                        ]
                    ]
                },
                {
                    &quot;name&quot;: &quot;h2o_temperature&quot;,
                    &quot;columns&quot;: [
                        &quot;fieldKey&quot;,
                        &quot;fieldType&quot;
                    ],
                    &quot;values&quot;: [
                        [
                            &quot;degrees&quot;,
                            &quot;float&quot;
                        ]
                    ]
                }
            ]
        }
    ]
}
</code></pre><h4 id="&#x4F8B;&#x4E09;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;from&#x5B50;&#x53E5;&#x7684;show-field-keys">&#x4F8B;&#x4E09;&#xFF1A;&#x8FD0;&#x884C;&#x5E26;&#x6709;<code>FROM</code>&#x5B50;&#x53E5;&#x7684;<code>SHOW FIELD KEYS</code></h4>
<pre><code>&gt; SHOW FIELD KEYS ON &quot;NOAA_water_database&quot; FROM &quot;h2o_feet&quot;

name: h2o_feet
fieldKey            fieldType
--------            ---------
level description   string
water_level         float
</code></pre><p>&#x8BE5;&#x67E5;&#x8BE2;&#x8FD4;&#x56DE;&#x6570;&#x636E;&#x5E93;<code>NOAA_water_database</code>&#x4E2D;measurement&#x4E3A;<code>h2o_feet</code>&#x7684;&#x5BF9;&#x5E94;&#x7684;field key&#x4EE5;&#x53CA;&#x5176;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x3002;</p>
<h3 id="show-field-keys&#x7684;&#x5E38;&#x89C1;&#x95EE;&#x9898;"><code>SHOW FIELD KEYS</code>&#x7684;&#x5E38;&#x89C1;&#x95EE;&#x9898;</h3>
<h4 id="&#x95EE;&#x9898;&#x4E00;&#xFF1A;show-field-keys&#x548C;field-&#x7C7B;&#x578B;&#x7684;&#x5DEE;&#x5F02;">&#x95EE;&#x9898;&#x4E00;&#xFF1A;<code>SHOW FIELD KEYS</code>&#x548C;field &#x7C7B;&#x578B;&#x7684;&#x5DEE;&#x5F02;</h4>
<p>field value&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x5728;&#x540C;&#x4E00;&#x4E2A;shard&#x91CC;&#x9762;&#x4E00;&#x6837;&#x4F46;&#x662F;&#x5728;&#x591A;&#x4E2A;shard&#x91CC;&#x9762;&#x53EF;&#x4EE5;&#x4E0D;&#x540C;&#xFF0C;<code>SHOW FIELD KEYS</code>&#x904D;&#x5386;&#x6BCF;&#x4E2A;shard&#x8FD4;&#x56DE;&#x4E0E;field key&#x76F8;&#x5173;&#x7684;&#x6BCF;&#x79CD;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x3002;</p>
<h5 id="&#x4F8B;&#x5B50;">&#x4F8B;&#x5B50;</h5>
<p>field <code>all_the_types</code>&#x4E2D;&#x5B58;&#x50A8;&#x4E86;&#x56DB;&#x4E2A;&#x4E0D;&#x540C;&#x7684;&#x6570;&#x636E;&#x7C7B;&#x578B;</p>
<pre><code>&gt; SHOW FIELD KEYS

name: mymeas
fieldKey        fieldType
--------        ---------
all_the_types   integer
all_the_types   float
all_the_types   string
all_the_types   boolean
</code></pre><p>&#x6CE8;&#x610F;<code>SHOW FIELD KEYS</code>&#x5904;&#x7406;field&#x7684;&#x7C7B;&#x578B;&#x5DEE;&#x5F02;&#x548C;<code>SELECT</code>&#x8BED;&#x53E5;&#x4E0D;&#x4E00;&#x6837;&#x3002;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="data_exploration.html" class="navigation navigation-prev " aria-label="Previous page: 数据查询语法">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="database_management.html" class="navigation navigation-next " aria-label="Next page: 数据库管理">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"schema查询语法","level":"1.6.2","depth":2,"next":{"title":"数据库管理","level":"1.6.3","depth":2,"path":"Query_language/database_management.md","ref":"Query_language/database_management.md","articles":[]},"previous":{"title":"数据查询语法","level":"1.6.1","depth":2,"path":"Query_language/data_exploration.md","ref":"Query_language/data_exploration.md","articles":[]},"dir":"ltr"},"config":{"plugins":["comment"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"comment":{"highlightCommented":true},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"github":"jasper-zhang/influxdb-document-cn","theme":"default","author":"jasper","pdf":{"pageNumbers":true,"fontSize":16,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"InfluxDB中文文档","language":"en","links":{"sidebar":{"InfluxDB中文文档":"https://legacy.gitbook.com/book/jasper-zhang1/influxdb"},"gitbook":true},"gitbook":"*","description":""},"file":{"path":"Query_language/schema_exploration.md","mtime":"2019-09-29T09:05:38.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-09-29T09:10:37.143Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-comment/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

